package com.yqg.protection.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yqg.protection.cover.DeviceStateConverter;
import com.yqg.protection.cover.IsOnlineConverter;
import com.yqg.protection.cover.LocalDateTimeConverter;
import com.yqg.protection.cover.SystemConverter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * equipment_input_store 实体类
 *
 * @author zxf
 * @since 2024-01-01
 */
@Getter
@Setter
@TableName("equipment_input_store")
@ApiModel(value = "EquipmentInputStore对象", description = "")
public class EquipmentInputStore implements Serializable {

    private static final long serialVersionUID = 1L;

    @ExcelProperty(value = "ID", index = 0)
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ExcelProperty(value = "设备号", index = 1)
    private String equipmentId;

    @ExcelProperty(value = "设备名", index = 2)
    private String equipmentName;

    @ExcelProperty(value = "单位ID", index = 3)
    private Long clientId;

    @ExcelProperty(value = "单位名称", index = 4)
    @TableField(exist = false)
    @ApiModelProperty("单位名称")
    private String clientName;

    @ExcelProperty(value = "组织ID", index = 5)
    private Long organization;

    @ExcelProperty(value = "组织", index = 6)
    @TableField(exist = false)
    private String organizationName;

    @ExcelProperty(value = "服务起日期", index = 7, converter = LocalDateTimeConverter.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime startTime;

    @ExcelProperty(value = "服务止日期", index = 8, converter = LocalDateTimeConverter.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime endTime;

    @ExcelProperty(value = "入库时间", index = 9, converter = LocalDateTimeConverter.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime inputTime;

    @ExcelProperty(value = "服务费", index = 10)
    private String price;

    @ExcelIgnore
    private Integer isDelete;

    @ExcelProperty(value = "状态", index = 11, converter = DeviceStateConverter.class)
    private String state;

    @ExcelProperty(value = "更新时间", index = 12)
    private String updateTime;

    @ExcelProperty(value = "厂家", index = 13)
    private String manufactor;

    @ExcelProperty(value = "厂家电话", index = 14)
    private String manufactorPhone;

    @ExcelProperty(value = "设备类型ID", index = 15)
    private Integer type;

    @ExcelProperty(value = "设备类型", index = 16)
    @TableField(exist = false)
    private String typeName;

//    @ExcelProperty(value = "是否绑定SIM卡", index = 17, converter = BindingConverter.class)
//    @ApiModelProperty("0未绑定SIM卡 ，1已绑定SIM卡")
//    private Integer deviceBindingSim;
//
//    @ExcelProperty(value = "SIM卡ID", index = 18)
//    @TableField(updateStrategy = FieldStrategy.IGNORED)
//    private Long simInputStoreId;

    @ExcelProperty(value = "SIM卡号", index = 17)
//    @TableField(exist = false)
    private String simId;

    @ExcelProperty(value = "销售价格", index = 18)
    private Double salePrice;

    @ExcelProperty(value = "地址", index = 19)
    private String address;

    @ExcelProperty(value = "跳转地址名称", index = 20)
    private String pageTurnName;

    @ExcelProperty(value = "跳转地址", index = 21)
    private String pageTurnUrl;

    @ExcelProperty(value = "协议类型", index = 22)
    private String protocolType;

    @ExcelProperty(value = "设备型号", index = 23)
    private String equipmentModel;

    @ExcelProperty(value = "心跳时长(小时)", index = 24)
    private Long heartbeatDuration;

    @ExcelProperty(value = "appkey", index = 25)
    private String appkey;

    @ExcelProperty(value = "secret", index = 26)
    private String secret;

    @ExcelProperty(value = "url", index = 27)
    private String url;

    @ExcelProperty(value = "监控地址", index = 28)
    private String addrMonitor;

    @ExcelProperty(value = "消控室对接主机", index = 29)
    @ApiModelProperty("消控室对接主机")
    private String dockHost;

    @ExcelProperty(value = "可对接场合", index = 30)
    @ApiModelProperty("可对接场合")
    private String dockPlace;

    @ExcelProperty(value = "对接方式", index = 31)
    @ApiModelProperty("对接方式")
    private String dockType;

    @ExcelProperty(value = "对接图片", index = 32)
    @ApiModelProperty("对接图片")
    private String dockPhoto;

    @ExcelProperty(value = "操作人ID", index = 33)
    private Long operatorId;

    @ExcelProperty(value = "操作人", index = 34)
    @TableField(exist = false)
    private String operatorName;

    @ExcelProperty(value = "是否在线", index = 35, converter = IsOnlineConverter.class)
    @TableField(exist = false)
    private String online;

    @ExcelProperty(value = "设施类型", index = 36, converter = SystemConverter.class)
    private Integer systemId;

    @ApiModelProperty("是否过期")
    @TableField(exist = false)
    private String isExpire;
}
